import request from '@/utils/request'

// 用户列表-分页
export const getSysUserListApi = params => request({
  url: '/sys_user/list',
  method: 'GET',
  params
})

// 管理员修改
export const editSysUserApi = data => request({
  url: '/sys_user/update',
  method: 'post',
  data
})

// 获取角色名称
export const getRoleAllApi = () => request({
  url: '/sys_role/allData',
  method: 'get'
})

// 管理员添加
export const addSysUserApi = data => request({
  url: '/sys_user/add',
  method: 'post',
  data
})

// 获取管理员详情
export const getSysUserInfoApi = id => request({
  url: '/sys_user/rowInfo?id=' + id,
  method: 'get'
})

// 管理员删除
export const delSysUserApi = id => request({
  url: '/sys_user/del?id=' + id,
  method: 'get'
})
